package com.itheima.sh.homeWork05;

import java.io.FileWriter;
import java.io.IOException;

public class FileWriterTest2 {
    public static void main(String[] args) {

        try (FileWriter fw = new FileWriter("D:/ITheima/img1/java.txt");) {
            fw.write("HelloWorld");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
